import request from '@/utils/request'

// 查询机房信息列表
export function listLabs(query) {
  return request({
    url: '/schoolmanage/labs/list',
    method: 'get',
    params: query
  })
}

// 查询机房信息详细
export function getLabs(labId) {
  return request({
    url: '/schoolmanage/labs/' + labId,
    method: 'get'
  })
}

// 新增机房信息
export function addLabs(data) {
  return request({
    url: '/schoolmanage/labs',
    method: 'post',
    data: data
  })
}

// 修改机房信息
export function updateLabs(data) {
  return request({
    url: '/schoolmanage/labs',
    method: 'put',
    data: data
  })
}

// 删除机房信息
// api/schoolmanage/labs.js
const baseUrl = '/schoolmanage/labs';
export function delLabs(labId) {
  return request({
    url: `${baseUrl}/${labId}`,
    method: 'delete'
  })
}

